import React, { Component } from 'react';

function HocComp(Comp) {
    return class _ extends Component {
        state = {
            num: 0,
            flag: true
        }
        isShow = () => {
            this.setState({
                flag: !this.state.flag
            })
            console.log(this.state.flag)
        }
        render() {
            let { num, flag } = this.state
            return (
                <Comp num={num} isShow={this.isShow} flag={flag} ></Comp>
            )
        }
    }
}

export default HocComp;